<?php
namespace app\common\config\validate;


use think\Validate;

class ConfigHallShapeValidate extends Validate
{
    protected $rule = [
        'id' => ['require'],
        'store_id' => ['require'],
        'hall_id' => ['require'],
        'shape' => ['require'],
        'tables' => ['require'],
        'image' => ['require'],
        'album' => ['require'],
    ];

    protected $message = [
        'id.require' => '参数错误',
        'store_id.require' => '参数错误',
        'hall_id.require' => '参数错误',
        'shape.require' => '请选择桌型',
        'tables.require' => '请输入容纳的桌数',
        'image.require' => '请上传桌型图',
        'album.require' => '请上传图集',
    ];

    protected $scene = [
        'create' => ['store_id', 'hall_id', 'shape', 'tables', 'image', 'album'],
        'edit' => ['id', 'store_id', 'hall_id', 'shape', 'tables', 'image', 'album'],
        'delete' => ['id'],
    ];
}